<p-dialog header="{{title}}" [(visible)]="display" modal="modal" [responsive]="true" [width]="500" [minWidth]="200" (onHide)="closePersonEditMask(false)">
  <!--<p-panel header="{{title}}">-->
    <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">
      <form [formGroup]="person">

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-3"></div>
          <div class="ui-grid-col-6">
            <label for="" >
              父节点：
              <span class="start_red">*</span>
            </label>
            <input class="cursor_not_allowed"
                   type="text" formControlName="asset_type_id"
                   pInputText [(ngModel)]="currentPer.nid" id="" [style.width.%]="60" readonly/>

          </div>
        </div>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-3"></div>
          <div class="ui-grid-col-6" id="">
            <label for="" >
              节点名：
              <span class="start_red">*</span>
            </label>
            <input class="cursor_not_allowed"
                   type="text" formControlName="asset_name"
                   pInputText *ngIf="state ==='add'" id="" [style.width.%]="60"/>
            <input class="cursor_not_allowed"
                   type="text" formControlName="asset_name"
                   pInputText [(ngModel)]="currentPer.name" *ngIf="state ==='update'" id="" [style.width.%]="75"/>

          </div>
        </div>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-3"></div>
          <div class="ui-grid-col-6" id="">
            <label for="" >
              U位高度：
              <span class="start_red">*</span>
            </label>
            <input class="cursor_not_allowed"
                   type="text" formControlName="u_height"
                   pInputText *ngIf="state ==='add'" id="" [style.width.%]="60" [(ngModel)]="u_height"
            />
            <input class="cursor_not_allowed"
                   type="text" formControlName="u_height"
                   pInputText [(ngModel)]="currentPer.pwd" *ngIf="state ==='update'" id="" [style.width.%]="75" readonly
            />
          </div>
        </div>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-3"></div>
          <div class="ui-grid-col-6">
            <label for="" >
              功率：
              <span class="start_red">*</span>
            </label>
            <input class="cursor_not_allowed"
                   type="text" formControlName="power"
                   pInputText *ngIf="state ==='add'" id="" [style.width.%]="60" [(ngModel)]="power"
            />
            <input class="cursor_not_allowed"
                   type="text" formControlName="power"
                   pInputText [(ngModel)]="currentPer.mobile" *ngIf="state ==='update'" id="" [style.width.%]="75"
            />

          </div>
        </div>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-3"></div>
          <div class="ui-grid-col-6">
            <label for="" >
              重量：
              <span class="start_red">*</span>
            </label>
            <input class="cursor_not_allowed"
                   type="text" formControlName="weight"
                   pInputText *ngIf="state ==='add'" id="" [style.width.%]="60" [(ngModel)]="weight"
            />
            <input class="cursor_not_allowed"
                   type="text" formControlName="weight"
                   pInputText [(ngModel)]="currentPer.mobile" *ngIf="state ==='update'" id="" [style.width.%]="75"
            />

          </div>
        </div>

        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-8"></div>
          <div class="ui-grid-col-2 padding-tblr">
            <button pButton type="submit" label="确认" (click)="formSubmit(false)" *ngIf="state ==='add'"></button>
            <!--<button pButton type="submit" label="确认" (click)="formSubmit(false)" [disabled]="!person.controls['perName'].valid || !person.controls['pid'].valid || !person.controls['pwd'].valid || !person.controls['mobile'].valid" *ngIf="state ==='add'"></button>
            <button pButton type="submit" label="确认" (click)="formSubmit(false)" [disabled]="!person.controls['perName'].valid || !person.controls['pid'].valid || !person.controls['mobile'].valid" *ngIf="state ==='update'"></button>-->
          </div>
          <div class="ui-grid-col-2 padding-tblr">
            <button pButton type="button" label="取消" (click)="closePersonEditMask(false)"></button>
          </div>
        </div>
      </form>
    </div>
  <!--</p-panel>-->
</p-dialog>
